<!--
 * @description 自定义页面配置
 * @author dumeng
 * @date 2022/10/19
 -->
<template>
  <div class="page-config-page">
    <v-page-maker :page-id="id" :ct-type="ctType" />
  </div>
</template>

<script>
import VPageMaker from '@/components/CustomPage/pagemaker'

export default {
  name: 'PageConfig',
  components: { VPageMaker },
  data() {
    return {
      id: '',
      ctType: ''
    }
  },
  created() {
    if (this.$route.query.i) {
      this.id = this.$route.query.i
      this.ctType = this.$route.query.id || ''
    } else {
      this.$message({
        showClose: true,
        message: '参数异常！',
        type: 'warning',
        onClose: () => {
          this.$router.back()
        }
      })
    }
  },
  methods: {}
}
</script>

<style scoped lang="scss">
@import '@/styles/utility/position.scss';
@import '@/styles/utility/center.scss';
@import '@/styles/utility/shadow.scss';
@import '@/styles/var.scss';

.page-config-page {
  height: 100%;
  position: relative;
  display: flex;
  background-color: #fff;

  &-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .el-header {
    line-height: 50px;
    border-bottom: 1px solid $f6;
    font-size: 14px;
    font-weight: 600;
  }

  .el-main {
    background-color: $f8;
  }

  .el-aside {
    border-right: 1px solid $f6;
  }
}
</style>
